<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>home</title>
</head>
<script type="text/javascript">
var username = "<%=request.getAttribute("username") %>";
var message = "<%=request.getAttribute("message") %>";
if(message != "null"){
	alert(username+message)
}
</script>
<body>
	<% if(request.getAttribute("username") == null){ %>
	Home,welcome<br>
	<a href="login2.html">登录</a> <br>
	<%} 
	else{%>
	Home,welcome <%=request.getAttribute("username") %><br>
	<a href="LoginServlet2?username=<%=request.getAttribute("username")%>">登录</a> <br>
	<a href="Logout?username=<%=request.getAttribute("username")%>">退出</a> <br>
	<% } %>
<a href="reg.html">注册</a> <br>
<a href="param.html">参数</a> <br>

</body>
</html>